package cw.spring.security.acl.poc.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * Used to store the accounts of all the clients of stardust. It also contains the rights (roles) of a user.
 * 
 * @author montagnoncy
 * 
 */
@Entity
@Table(name = "Acl_Sid")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AclSidModel {

  private String sid; // name of the user
  private Boolean principal;

  private long id;

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

  public String getSid() {
    return sid;
  }

  public void setSid(String sid) {
    this.sid = sid;
  }

  public Boolean getPrincipal() {
    return principal;
  }

  public void setPrincipal(Boolean principal) {
    this.principal = principal;
  }

}
